package com.efrei.uchat.client.model;

import com.efrei.uchat.message.TextMessage;

public class Message {
	
	private String author;
	private String text;
	
	public Message(String author, String text) {
		super();
		this.author = author;
		this.text = text;
	}
	
	public Message(TextMessage message) {
		super();
		this.author = message.getAuthor();
		this.text = message.getText();
	}

	@Override
	public String toString() {
		return author + ": " + text;
	}
	
	public String getAuthor() {
		return author;
	}
	
	public String getText() {
		return text;
	}
}
